package com.baizhi;


import com.baizhi.entity.Admin;
import com.baizhi.entity.Menu;
import com.baizhi.mapper.AdminMapper;
import com.baizhi.service.IAdminService;
import com.baizhi.service.IMenuService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;
import java.util.List;

@SpringBootTest(classes = Application.class)
@RunWith(SpringRunner.class)
public class aopcs {

    @Autowired
    private IAdminService ia;
    @Resource
    private AdminMapper ad;
    @Autowired
    private IMenuService menuService;

    @Test
    public void aopCs(){

        List<Menu> menus = menuService.selectMenuTree();
        menus.forEach(System.out::println);
    }
    @Test
    public void adAop(){
        Admin lisi = ia.select("lisi");
        System.out.println("lisi = " + lisi);
    }

}
